import pandas as pd
import numpy as np
from kaggle_tool.fill_empty import GroupModeFiller


if __name__ == "__main__":

    #1.读取整体数据
    data_train = pd.read_csv("train.csv")
    data_test = pd.read_csv("test.csv")
    sample_output = pd.read_csv("sample_submission.csv")

    #2. label 和 x 轴列
    label_column = "Personality"
    x_columns = list(data_train.columns)[:-1]

    #3.处理空值
    empty_filler = GroupModeFiller(group_col=label_column, fill_cols=x_columns)
    empty_filler.fit(data_train)
    data_train = empty_filler.transform(data_train)
    data_test = empty_filler.transform(data_test)

    print(data_train.head(10))
    print(data_test.head(10))

    #4.分离数据
    print(sample_output.head(10))